package interviewpreparationkit.stringmanipulation


import redirectSystemIn
import redirectSystemOut
import org.junit.jupiter.api.Test
import java.util.*

class IsValidTests {
    @Test
    fun isValidTest() {
        redirectSystemIn(this.javaClass) {
            val scan = Scanner(System.`in`)
            redirectSystemOut { expectedList ->
                while (scan.hasNextLine()) {
                    val s = scan.nextLine()

                    val result = isValid(s)

                    println(result)
                    expectedList.add(scan.nextLine().trim())
                }
            }
        }
    }
}